package com.zero.manage.web.utils.generate;

import com.zero.manage.web.components.entity.SysDictEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * SqlServer数据库相关操作
 *
 * @author zero
 */
@Repository
public interface SqlServerDao extends JpaRepository<SysDictEntity, String> {
    /**
     * 获取数据库名称
     *
     * @return
     */
    @Query(value = "select name from master.dbo.sysdatabases order by name", nativeQuery = true)
    List<String> getCatalogs();
}
